home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swaga_c.zip / CURSOR.SWG / 0025_Hiding Cursor ....pas < prev   
Pascal/Delphi Source File  |  1995-03-03  |  938b  |  41 lines

  1. {
  2. To change the cursor do the following:
  3.  
  4. set ah=1
  5. set up ch as follows
  6.     bit 7 = 0
  7.     bits 6,5 = cursor blink :
  8.                   00 = normal
  9.                   01 = invisible
  10.                   10 = erratic
  11.                   11 = slow
  12.                   * On EGA/VGA, anything other than 00 = invisible
  13.     bits 0-4 = top scan line for cursor
  14. setup cl as follows:
  15.     bits 0-4 = bottom scan line
  16. call  int $10
  17.  
  18. A normal underline cursor starts at scan line 6 and ends at line 7, so for
  19. that:
  20. }
  21. procedure underline_cursor; assembler;
  22.  
  23. asm
  24.    mov ah,1    {Set ah=1}
  25.    mov ch,6    {Set ch=6}
  26.    mov cl,7    {Set cl=7}
  27.    int 10h     {Call int $10} 
  28. end; 
  29.  
  30. For an invisible cursor simply set the 5th bit of ch: 
  31.  
  32. procedure cursor_off; assembler; 
  33.  
  34. asm 
  35.    mov ah,1    {Set ah=1} 
  36.    mov ch,26h  {Set ch=$26 or 00100110 in binary} 
  37.    mov cl,7    {Set cl=7} 
  38.    int 10h     {Call int $10}
  39. end; 
  40.  
  41.